public class move0 {
    public static void moveZeroes(int[] nums) {
        int dest=0;
        int cur=0;
        while(cur<nums.length){
            if(nums[cur]==0){
                cur++;
            }else{
                int tmp=nums[cur];
                nums[cur]=nums[dest];
                nums[dest]=tmp;
                cur++;
                dest++;
            }
        }
    }
    public static void main(String[] args) {

    }
}
